<template>
	<view>
		<image src="../../static/kefuact.png" class="arc" /> 
		<button open-type="contact" class="button" >打开客服</button>
	</view>
</template>

<script>
	export default {
		onShareAppMessage() {
			const userinfo = JSON.parse(uni.getStorageSync('userinfo'))
			return {
				title: '预约咨询',
				path: 'pages/index/index?scene=' + userinfo.inviteCode, // 分享页面的路径
				imageUrl: '../../static/banner.jpg', // 分享图片的链接
			};
		},
		data() {
			return {
				
			}
		},
		onShow() {
			const userinfo = JSON.parse(uni.getStorageSync('userinfo'))
			if(!userinfo.nickName || userinfo.nickName === '微信用户') {
				uni.showModal({
					title: '请先完善用户名称',
					showCancel: false,
					success() {
						uni.switchTab({
							url: '/pages/userinfo/userinfo'
						})
					}
				})
				
			}
			// console.log(11)
		},
		methods: {
		}
	}
</script>

<style scoped>
	.arc {
		width: 150upx;
		height: 150upx;
		border-radius: 50%;
		margin: 30vh auto 20px;
		display: block;
	}
	.button {
		width: 90vw;
		display: block;
		margin: auto;
		background: #FF9800;
		color: #fff;
	}
</style>
